﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<style type="text/css">
    .username_text {
        margin-left: 280px;
        width: 150px;
        height: 40px;
        line-height: 40px;
        float: left;
        font-size: 14px;
        color: #999;
        /*margin: 10px 0px;*/
    }

    .login_clear {
        clear: both;
        width: 100%;
        height: 2px;
        margin: 20px 0px 20px 0px;
    }

    .input {
        padding: 5px 4px;
        min-height: 28px;
        line-height: 28px;
        border: 1px solid #d4d4d4;
        background: #fff;
        vertical-align: middle;
        color: #333;
        font-size: 100%;
    }
</style>
<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>忘记密码</title>
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <link href="~/Content/validform.css" rel="stylesheet" />
    <script src="~/Scripts/Validform_v5.3.2_min.js"></script>
    <script src="~/Scripts/Validform_Datatype.js"></script>
    <script type="text/javascript">
        $(function () {
            $("form").Validform({
                tiptype: 3
            });
            //点击验证码
            $("#valiCode").click(function () {
                this.src = "/Login/GetValidateCode?time=" + (new Date()).getTime();
            });
        });
        function OnSuccess(data) {
            if (data.Status == -1) {
                //$.dialog.tips(data.Message, 1, 'tips.gif');
                alert(data.Message);
                return false;
            } else {

                window.location.href = data.Data;
            }
            return false;
        }
    </script>

</head>
<body>
    <div class="line10"></div>
    <div class="container">
        <div class="order-process">
            <ul>
                <li class="active">填写账户名</li>
                <li class="active">验证身份</li>
                <li class="active">设置新密码</li>
            </ul>
        </div>
        <div id="main_login">

            @using (Ajax.BeginForm("UpdatePwd", new AjaxOptions() { OnSuccess = "OnSuccess" }))
            {
                <input type="hidden" id="Id" name="Id" value=" @ViewBag.MemberId "/>
                <div class="username_text">请输入新的密码：</div>
                <div class="input-box">
                    @Html.Password("userPwd", null, new { @class = "input normal", datatype = "*6-20", nullmsg = "请输入新密码", errormsg = "密码范围在6-20位之间", sucmsg = " " })
                </div>
                
                <div class="login_clear"></div>
                <div class="username_text">请确认密码：</div>
                <div class="input-box">
                    @Html.Password("userPwd2", null, new { @class = "input normal", datatype = "*6-20", recheck = "userPwd", nullmsg = "请再输入一次新密码", errormsg = "两次输入的密码不一致", sucmsg = " " })
                </div>
                <div class="login_clear"></div>
                <div style="text-align: center;">
                    <input type="submit" id="sure" value="提交" class="button" />
                </div>
                <div class="login_clear"></div>
            }
        </div>
        <div class="line10"></div>
    </div>
</body>
</html>

